let app = getApp();

Component({
    /**
     * 组件的属性列表
     */
    properties: {
        showAuthDialog: {
            type: Boolean,
            value: true
        },
        dialogTitle: {
            type: Boolean,
            value: false
        },
        confirm: {
            type: Boolean,
            value: false
        },
        complete: {
            type: Boolean,
            value: false
        },
        content: {
            type: String,
            value: ''
        },
        dialogPrompt: {
            type: String,
            value: ''
        }
    },

    /**
     * 组件的初始数据
     */
    data: {

    },

    /**
     * 组件的方法列表
     */
    methods: {
        // 关闭对话框
        closeDialog() {
            this.triggerEvent("close")
        },
        
        // 对话框确认
        confirmDialog() {
            this.triggerEvent("confirm");
        },

        // 完毕对话框
        completeDialog() {
            this.triggerEvent("complete")
        }
    },
    lifetimes: {
        attached: function() {
            this.setData({ lang: app.globalData.lang })
        },
    }
})
